#include <iostream>
#include <algorithm>
using namespace std;

int v[4], a[4];

bool cmp1(int x, int y)
{
	return x < y;
}
bool cmp2(int x, int y)
{
	return x > y;
}

int main()
{
	for(int i = 1; i <= 3; i++) cin >> v[i];
	for(int i = 1; i <= 3; i++) cin >> a[i];
	sort(v + 1, v + 1 + 3);
	sort(a + 1, a + 1 + 3);
	int ret = 0;
	if(a[3] > v[2]) ret++;
	if(a[2] > v[1]) ret++;
	if(ret >= 2) cout << "Yes" << endl;
	else cout << "No" << endl;
	return 0;
}
